<template>
  <div class="mainContent">
    <div class="step">
      <Steps :current="stepNum">
        <Step title="项目信息"></Step>
        <Step title="众筹回报"></Step>
        <Step title="账户信息"></Step>
      </Steps>
    </div>
    <div class="inputBox">
      <div class="inputBox" v-if="step === 'first'">
        <basic_info @first_step="first_step"></basic_info>
      </div>
      <div class="inputBox" v-else-if="step === 'second'">
        <level_info @pre="pre" @finish="finish"></level_info>
      </div>
      <div class="inputBox" v-else-if="step === 'third'">
        <finish ></finish>
      </div>
    </div>
  </div>
</template>

<script>

export default {
  name: "project_info",
  components: {
    //项目信息
    basic_info,
    //档位信息
    level_info,
    //完成
    finish
  },
  data() {
    return {
      stepNum:0,
      step: "first"
    };
  },
  methods:{
    first_step(e){
      this.step='second';
      this.stepNum=1;
    },
    pre(e){
      this.step='first';
      this.stepNum=0;
    },
    finish(e){
      this.step='third';
      this.stepNum=2;
    }
  }

};
import basic_info from "./basic_info/basic_info";
import level_info from "./level_info/level_info";
import finish from "./finish/finish"
</script>

<style scoped>
  .main {
    margin: 50px;
  }
  .inputBox {
    margin-top: 40px;
  }
  h2 {
    margin-bottom: 20px;
  }
</style>
